package com.yp.infrastructure.demo.config.axon;

import com.yp.infrastructure.axon.interceptor.IAxonCommandHandlerInterceptor;
import com.yp.infrastructure.common.exception.BaseException;
import lombok.extern.slf4j.Slf4j;
import org.axonframework.commandhandling.CommandMessage;
import org.springframework.stereotype.Component;



@Slf4j
@Component
public class PartnerCommandHandlerInterceptorImpl implements IAxonCommandHandlerInterceptor {
    @Override
    public void onCommandMessageHandlerInterceptor(Object payload) throws BaseException {
        IAxonCommandHandlerInterceptor.super.onCommandMessageHandlerInterceptor(payload);
    }

    @Override
    public void onCommandMessageDispatcherInterceptor(Object payload) throws BaseException {
        IAxonCommandHandlerInterceptor.super.onCommandMessageDispatcherInterceptor(payload);
    }

    @Override
    public boolean onCommandHandlerEnhancedDefinitionInterceptor(CommandMessage<?> commandMessage) throws BaseException {
        return IAxonCommandHandlerInterceptor.super.onCommandHandlerEnhancedDefinitionInterceptor(commandMessage);
    }
}
